1. Field of the Invention
The present invention relates to an image processing apparatus, a microscope system, and a recording medium for combining a plurality of images to generate an image with a higher dynamic range.
2. Description of the Related Art
Conventionally, a high dynamic range process (hereinafter, “HDR process”) is known in the field of an image processing apparatus provided with an imaging apparatus such as a microscope system, wherein a plurality of images (hereinafter, “original images”) taken with different exposure conditions are combined to generate an image (hereinafter, “HDR image”) with a higher dynamic range than that of the original images.
According to the HDR process, phenomena called blown out highlights and blocked up shadows can be prevented, and in principle, a subject can be favorably imaged in bright and dark sections to obtain a high-quality image. For example, if a soldered printed circuit board is imaged in a normal way, there are blown out highlights in a soldered section 1 as illustrated in FIG. 1A. Even in that case, the execution of the HDR process can obtain an image correctly expressing the gradation of the soldered section 1 as illustrated in FIG. 1B.
However, in the actual HDR process, a bright section of the subject may be imaged as a dark section, and a dark section may be imaged as a bright section. For example, FIG. 1C illustrates an example of imaging the soldered section 1, which is a bright section of the subject, as a dark section. Therefore, although the blown out highlights and the blocked up shadows are prevented, an image with reduced image quality is generated.
The reduction in the image quality needs to be particularly avoided in displaying moving images, although the reduction in the image quality is by no means preferable in displaying still images. The reason can be described as follows. As an area with reduced image quality moves with time in the movie display, not only the image quality is simply reduced, but the observer observes a blinking phenomenon in the movie display as illustrated in FIGS. 2A to 3E. Therefore, the reduction in the image quality gives much discomfort and burden to the observer. FIGS. 2A to 2E are diagrams illustrating HDR images generated at different timing, and FIGS. 3A to 3E are enlarged views of FIGS. 2A to 2E. FIGS. 2A to 3E illustrate movement of an area with reduced image quality (a soldered section imaged as a dark section).
Although there can be various factors for the reduction in the image quality of an HDR image, a displacement between original images to be combined can be a main factor. Typically, the displacement may occur when the original images are taken while the field of view is moved by stage operation or when the imaging apparatus is shaken. The displacement includes deviation of the angle of view between the original images.
Therefore, a technique of correcting the displacement to prevent the reduction in the image quality of the HDR image caused by the displacement is proposed. Japanese Patent Laid-Open No. 2012-165259 discloses a digital camera that calculates an amount of displacement between original images as a motion vector and that combines the original images after positioning the original images.